home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Demos
/
HALLOWEEN.ARC
/
SIDPIC V3.4
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
12KB
|
227 lines
10 POKE52,PEEK(46)+8:POKE56,PEEK(52):CLR
11 A1$="ABCDEFGHIJKLMNOPQ":A1$=A1$+A1$+A1$+A1$+A1$:A1$=A1$+A1$+A1$
12 DEF FNH(X)=INT(X/256)
13 DEF FNL(X)=X-256*FNH(X)
14 BL$=" ":C$=CHR$(.):P1=0
15 SA=780:SX=781:SY=782:SP=783:POKESA,1:POKESX,8:POKESY,1:SYS 65466
16 POKE53281,0:POKE53280,11:POKE650,128
17 PRINT"[147]"CHR$(142);:GOSUB59
18 PRINT" CAN PLAY ALL CURRENT SIDPLAYER FILES"
19 PRINT" AS USED WITH KPLAY, MPLAY, SINGALONG"
20 PRINT" AND OTHER COMPARABLE SIDPLAYERS."
21 PRINT" USES SID MUSIC AND RELATED FILES:"
22 PRINT" [158].MUS (MUSIC FILES), [153]WITH..."
23 PRINT" [158].WDS (WORD FILES) [153]AND/OR..."
24 PRINT" [158].PIC (KOALA/DOODLE & B/W PICTURES)"
25 PRINT " THE BASIC SIDPLAYER IS FROM COMPUTE'S"
26 PRINT " "CHR$(34)"ALL ABOUT THE COMMODORE 64, VOL. TWO"CHR$(34)
27 PRINT " BY CRAIG CHAMBERLAIN - (C) COMPUTE!"
28 PRINT " [154][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
29 PRINT " HIT SPACE TO READ DIRECTORY[146][187]"
30 PRINT " [188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
31 PRINT "[151].(C)1986,1987 OKAY TO COPY, NOT TO SEL.[157]"CHR$(148)"L"
32 SS=12288:HK=SS+274:PL=SS+297:DP=SS+471:SV=PEEK(55)+PEEK(56)*256:MA=0
33 SYS10638
34 REM ***** NEXT SCREEN PAGE
35 NP=0
36 PRINT"[147][158][213][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][201][157][157]"CHR$(148)"[192]"
37 FORA=1TO17:PRINT"[221]"SPC(12)"[221]"SPC(12)"[221]"SPC(11)"[221][157]"CHR$(148):NEXT
38 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][203][157][157]"CHR$(148)"[192]":GOSUB59
39 PRINT"[154]EXIT: F7 REPLAY: * [221]"
40 PRINT"[154]PLAY ONE:F1/[154]PLAY FROM:F3/[154]NEW DISK:F5[221]":GOTO67
41 PRINT"[147][158][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201][157][157]"CHR$(148)"[192]"
42 FORA=1TO9:PRINT"[221]"SPC(37)"[221][157]"CHR$(148):NEXT
43 PRINT"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179][157][157]"CHR$(148)"[192]"
44 PRINT"[221] NOTES:F1/NEXTSONG:F3/MENU:F5/EXIT:F7[158][221][157]";CHR$(148)" [158]"
45 PRINT"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179][157][157]"CHR$(148)"[192]"
46 FOR A=1 TO 5:PRINT"[221]"SPC(37)"[221][157]"CHR$(148):NEXT
47 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][157][157]"CHR$(148)"[192]":GOSUB59:RETURN
48 REM ***** MUSIC KEYBOARD DISPLAY
49 POKESS+5,7:POKESS+6,2:POKESS+7,14
50 V=53248:POKEV+23,7:POKEV,0:POKEV+2,0:POKEV+4,0:POKEV+16,0:POKEV+21,7
51 PRINT"[145][161][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][146][165]"
52 PRINT"[161][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][146][165]"
53 PRINT"[161][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][146][165]"
54 PRINT"[161][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][146][165]"
55 PRINT"[161][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][146][165]"
56 PRINT"[161][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][199][146][167][167][199][146][167][167][167][146][165]"
57 PRINT"[161][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][146][165]"
58 PRINT"[161][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][199][146][165]":RETURN
59 PRINT" [213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
60 PRINT" [221] [213][201][154][178][159][176][201] [187][159][178][201][154][178][213][201] V3.4[221]
61 [153]" (null) MID$RIGHT$CONT(null)OPEN(null)(null) SINWAIT OPEN-(null)CONT(null)(null) (null)
62 PRINT" [221] [202][203][154][177][159][173][203][188] [159][177] [154][177][202][203] [221]
63 [153]" (null) CONTTHE SIDPLAYER ART AND MUSIC REVIEW (null)
64 PRINT" [202][192][192][192][192][192][192][192][201] K[159]E[156]RMI[158]T [129]R. [149]W[150]O[152]O[153]D[154]A[155]L[153]L [213][192][192][192][192][192][192][192][192][203]"
65 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]":RETURN
66 REM ***** PRINTOUT DIR
67 CL=5:PRINT ""
68 GOTO192
69 SYS9960:
70 REM ***** GET SONG TITLE
71 SYS10008
72 LA=SV
73 PRINT"";:F1=FRE(0):F$="":F1=1024+(40*7)+1:V0=7:H0=1
74 POKEF1,PEEK(F1)+128
75 POKEF1,PEEK(F1)-128:F1=1024+(V0*40)+H0:POKEF1,PEEK(F1)+128
76 SYS10054:GET A$:IFA$=""THENV0=V0+1:IFV0>23THENV0=7
77 IFA$="[145]"THENV0=V0-1:IFV0<7THENV0=23
78 IFA$=""THENH0=H0+13:IFH0>27THENH0=1
79 IFA$="[157]"THENH0=H0-13:IFH0<1THENH0=27
80 IFA$=""THENV0=7:H0=1
81 IFA$="[135]" GOTO35
82 IFA$="[137]"THENNP=NP+K:GOTO36
83 IFA$="[134]" GOTO100
84 IFA$="[136]"THENPOKE53280,14:POKE 53281,6:PRINT"[147][154]";:GOTO235
85 IFA$="*" GOTO94
86 IFA$=CHR$(13) GOTO90
87 IFA$=CHR$(141)THENGOSUB121:CL=13:GOTO74
88 IFPEEK(654)=5THENIFPEEK(197)=5GOTO108
89 IFA$<>"[133]" GOTO75
90 POKEF1,PEEK(F1)-128
91 SYS9912:
92 POKE198,0:GOSUB116:GOSUB127:GOTO69
93 REM ***** REPLAY LAST MUSIC
94 POKEF1,PEEK(F1)-128:SYS9912:
95 IFMA<SV GOTO71
96 A$="":IFWDSTHENWT=WA:GOSUB172:POKE700,1
97 IFPICTHENGOSUB189
98 HI=FNH(MA):LO=FNL(MA):GOSUB132:GOTO69
99 REM ***** F3 PLAY ALL MUSIC-FROM
100 POKEF1,PEEK(F1)-128:POKE703,V0:POKE704,H0
101 FOR V0=V0 TO 23:FOR H0=H0 TO 27 STEP 13:F$="":F1=1024+(V0*40)+H0:LA=SV
102 SYS9912:
103 IF(PEEK(F1+54272)AND15)=CLTHENGOSUB116:GOSUB127
104 SYS9960:
105 NEXT:H0=1:NEXT:IFPEEK(654)=1THENV0=PEEK(703):H0=PEEK(704):GOTO101
106 GOTO69
107 REM ***** C=F3 (null) MUSIC FILES
108 POKEF1,PEEK(F1)-128
109 FOR V0=7 TO 23:FOR H0=1 TO 27 STEP 13:F$="":F1=1024+(V0*40)+H0:LA=SV
110 SYS9912:
111 IF(PEEK(F1+54272)AND15)=13THENGOSUB116:GOSUB114
112 SYS9960:
113 NEXT:NEXT:GOTO35
114 CLOSE15:OPEN15,8,15,"S0:"+F$+".???":PRINT#15,"I0:":CLOSE15:RETURN
115 REM ***** GET MUSIC FILENAME
116 F$="":FG=0:FOR X=F1+11 TO F1 STEP-1:A=PEEK(X):IFFG=0THENIFA=32 GOTO118
117 FG=1:F$=CHR$(A+ABS(64*(A<32)))+F$:POKEX,A+128:POKEX+54272,1
118 NEXT:FOR X=F1+11 TO F1 STEP-1:IFPEEK(X)>128THENPOKEX,PEEK(X)-128
119 NEXT:RETURN
120 REM ***** COLOR NAME
121 POKEF1,PEEK(F1)-128
122 FG=0:FOR X=F1+11 TO F1 STEP-1:A=PEEK(X):IFFG=0THENIFA=32 GOTO124
123 FG=1:POKEX,A+128:POKEX+54272,(PEEK(X+54272)+8) AND 15
124 NEXT:FOR X=F1+11 TO F1 STEP-1:IFPEEK(X)>128THENPOKEX,PEEK(X)-128
125 NEXT:RETURN
126 REM ***** LOAD MUSIC @FRE MEM
127 IFF$=""THENRETURN
128 GOSUB162:GOSUB176
129 MA=LA:HI=FNH(MA):LO=FNL(MA):F$=F$+".MUS":GOSUB203
130 IFPEEK(SP)AND1 GOTO208
131 REM ***** HOOK INTO INTERRUPT
132 SYS HK:POKE SX,LO:POKE SY,HI:SYS PL:F=PEEK(SX)+256*PEEK(SY):F$="":FS=F
133 REM ***** PRINT CREDIT BLOCK
134 IFPICTHENSYS9676::GOSUB189:GOTO141
135 F$="":GOSUB41:PRINT"";SPC((40-LEN(T$))/2-1);T$
136 IFWDS=0THENGOSUB48
137 PRINT"[154]";:P=-1:L=0
138 F=F+P+1:POKE113,FNL(F):POKE114,FNH(F)
139 SYS9874::P=PEEK(142):L=L+1:A=PEEK(F+P)
140 IFL<6THENIFATHENPRINT"";LEFT$(A1$,P+1);:IFMID$(A1$,P+1,1)<>C$GOTO138
141 SYS11246:WAIT 56320,16:POKE 198,0:POKE SS,7
142 REM ***** WAIT UNTIL FINISHED
143 SYS10054:IFPEEK(198) GOTO151
144 IFWDSTHENGOSUB221:GOTO146
145 GOSUB231
146 IFPEEK(SS)AND 7 GOTO143
147 GOSUB157
148 POKEV+5,0:POKEV+7,0:POKEV+9,0
149 IFA$="[135]"THENA$="":GOTO35
150 RETURN
151 GETA$:POKE198,0:POKESS,0
152 IFA$="[133]"THENIFP1=0THENGOSUB159:P1=PI:T$="":F=FS:PI=0:WD=0:POKESS,7:GOTO134
153 IFA$="[133]"THENIFP1THENPI=P1:P1=0:POKESS,7:POKEV+21,0:GOTO134
154 IFA$="[136]"THENGOSUB157:GOTO69
155 IFA$="P"THENA=PEEK(54296):POKE54296,0:WAIT198,1:GETA$:POKESS,7:POKE54296,A:GOTO143
156 GOTO147
157 GOSUB159:POKE53269,0:POKE54276,0:POKE54283,0:POKE54290,0:SYSDP:RETURN
158 RETURN
159 SYS11334:SYS9809::POKE700,0
160 RETURN
161 REM ***** LOAD WORD FILE
162 POKE700,0:T$="":WD=0:OPEN1,8,8,F$+".WDS,P":GET#1,A$,B$:IFSTTHENCLOSE1:RETURN
163 CLOSE1:WD=1:WA=LA:T$=A$+B$
164 F$=F$+".WDS":HI=FNH(LA):LO=FNL(LA):GOSUB203
165 IFPEEK(SP)AND1 GOTO208
166 POKE700,1
167 LA=PEEK(SX)+PEEK(SY)*256:WT=WA:FOR A=LA TO LA+5:POKE A,13:NEXT:LA=LA+5
168 F$=LEFT$(F$,LEN(F$)-4):POKE113,FNL(WA):POKE114,FNH(WA)
169 SYS9874::A=PEEK(142)
170 T$=T$+LEFT$(A1$,A)
171 WA=WA+A+1:WT=WA
172 POKE113,FNL(WT):POKE114,FNH(WT)
173 SYS9874::A=PEEK(142)
174 SYS10013:W2$=LEFT$(A1$,A):WT=WT+A+1
175 RETURN
176 REM ***** CHECK FOR PICTURE
177 PIC=0:P1=0:OPEN1,8,8,F$+".PIC":GET#1,A$,B$:IF(ST AND 64)THENCLOSE1:RETURN
178 CLOSE1:A=ASC(B$+C$)
179 IFA=96THENPIC=1:GOTO182
180 IFA=92THENPIC=2:GOTO182
181 PIC=3
182 POKE 665,PIC:HI=96:LO=0:F$=F$+".PIC":GOSUB203:REM PICS @ $6000
183 IFPEEK(SP)AND1 GOTO208
184 F$=LEFT$(F$,LEN(F$)-4):ON PIC GOTO185,186,187
185 SYS10980:GOTO188
186 SYS11061:GOTO188
187 SYS11118:GOTO188
188 RETURN
189 IFWDS=0THENRETURN
190 SYS11523:PRINT SPC((40-LEN(T$))/2)""T$:POKE700,2:RETURN
191 REM ***** WHAT FILES ON DISK
192 FOR F=1 TO 4:POKE 580+F,ASC(MID$(".MUS",F)):NEXT
193 OPEN 1,8,0,"$0:*=P":GET #1,S$,S$:PRINT "";:TB=1:K=0
194 IFNP>0THENPOKE2,5:FOR A=1 TO NP:SYS9579::NEXT
195 POKE2,0:SYS9579::TB=TB+13:PRINT TAB(TB);:IFTB=40THENTB=1:PRINT "";
196 IFST=0THENK=K+1:IFK<51 GOTO195
197 IFK=0THENP$="NO MUSIC ON DISK!":GOTO211
198 POKE2,5:SYS9579:
199 IFST=0THENPRINT""SPC(12)"F2 - NEXT PAGE"
200 CLOSE1:SYS65484
201 GOTO71
202 REM ***** MUSIC FILE LOADER
203 POKESA,1:POKESX,8:POKESY,0:SYS65466
204 FOR F=1 TO LEN(F$):POKE 584+F,ASC(MID$(F$,F)):NEXT
205 POKE SA,LEN(F$):POKE SX,73:POKE SY,2:SYS 65469
206 POKESA,0:POKESX,LO:POKESY,HI:SYS65493:RETURN
207 REM ***** ERROR MESSAGES
208 P=PEEK(SA):P$="ERROR: ":IFP=4THENP$=P$+"FILE NOT FOUND":GOTO211
209 IFP=5THENP$=P$+"DEVICE NOT PRESENT":GOTO211
210 P$=P$+STR$( ST )
211 SYS9809:
212 A=LEN(P$):S=19-(A/2):A$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
213 PRINT "[147]";SPC(S);"[213]";LEFT$(A$,A);"[201]"
214 PRINT SPC(S);"[221]";P$;"[221]"
215 PRINT SPC(S);"[202]";LEFT$(A$,A);"[203]"
216 POKE198,0:PRINT SPC(20-4);"[145][179]RETURN[171]":FOR B=1 TO 500:NEXT
217 PRINT SPC(20-4);"[145][192][192][192][192][192][192][192][192]":FOR B=1 TO 500:NEXT
218 IFPEEK(198)THENA$="":GET A$:IFA$=CHR$(13)THENRUN
219 GOTO216
220 REM ***** DISPLAY WORDS
221 IFPEEK(SS+1)<1THENRETURN
222 W1$=W2$:POKE113,FNL(WT):POKE114,FNH(WT)
223 SYS9874::A=PEEK(142)
224 SYS10013:WT=WT+A+1
225 W2$=LEFT$(A1$,A)
226 IFPIC=0THENPRINT"";:GOSUB229:PRINT"";:GOSUB230:GOTO228
227 PRINT"";:GOSUB229:GOSUB230
228 POKESS+1,0:RETURN
229 PRINT"[153]"W1$;LEFT$(BL$,39-POS(0)):RETURN
230 PRINT""W2$;LEFT$(BL$,39-POS(0));:POKE212,0:PRINT"":RETURN
231 REM ***** MUSIC ONLY DISPLAY
232 IFPIC=0THENSYS10099
233 RETURN
234 :
235 END